import request from '@/utils/request'

// 查询学院信息列表
export function listColleges(query) {
  return request({
    url: '/edu/hColleges/list',
    method: 'get',
    params: query
  })
}

export function getHCollegesBySchoolId(schoolId) {
  return request({
    url: '/edu/hColleges/list/' + schoolId,
    method: 'get'
  })
}

// 查询学院信息详细
export function getColleges(collegeId) {
  return request({
    url: '/edu/hColleges/' + collegeId,
    method: 'get'
  })
}

// 新增学院信息
export function addColleges(data) {
  return request({
    url: '/edu/hColleges',
    method: 'post',
    data: data
  })
}

// 修改学院信息
export function updateColleges(data) {
  return request({
    url: '/edu/hColleges',
    method: 'put',
    data: data
  })
}

// 删除学院信息
export function delColleges(collegeId) {
  return request({
    url: '/edu/hColleges/' + collegeId,
    method: 'delete'
  })
}

// 导出学院信息
export function exportColleges(query) {
  return request({
    url: '/edu/hColleges/export',
    method: 'get',
    params: query
  })
}